27. Maven in IntelliJ

Maven in IntelliJ

ND079 JPND C3 L2 A22 Maven In IntelliJ

Execute Maven Phases

You can run any maven phase directly in IntelliJ by opening the Maven tools window on the right side of your IDE, expanding the **lifecycle **category, and then right clicking on the phase you want to run. You can also explore Plugins and Dependencies in this view. Mouse-over the different options to see what they do! They all map to command-line commands.

Maven Lifecycle Phases in IntelliJ

Maven Lifecycle Phases in IntelliJ

Maven Run Configurations

You can save various Maven commands as run configurations. Click Add Configuration on the above screen and then use the + icon and scroll down to Maven to create a new Maven run configuration. You can type any Maven commands you want to run into the Command Line field.

Add a New Run Configuration for Maven

Add a New Run Configuration for Maven

Make a Run Configuration that runs `mvn clean package`

Make a Run Configuration that runs mvn clean package